package business.impls.stores;

import business.interfaces.stores.AbitStore;
import business.interfaces.classes.Abit;
import business.impls.commons.implAbitSystemData;
import business.impls.commons.jdbcTable;
import business.impls.classes.implAbit;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * Created by IntelliJ IDEA.
 * User: alex
 * Date: 08.04.2005
 * Time: 16:32:04
 * To change this template use File | Settings | File Templates.
 */
public class implAbitStore extends implAbitSystemData implements AbitStore{

    public Abit getAbit(int Passtype, String PassSer, String PassNum) {
        implAbit tmp = new implAbit();
        tmp.setDataProvider(prov);
        tmp.setDataSystem(system);
        tmp.setID(Passtype,PassSer,PassNum);
        return tmp;
    }

    public Abit getAbit(int ID){
        implAbit tmp = new implAbit();
        tmp.setDataProvider(prov);
        tmp.setDataSystem(system);
        tmp.setID(ID);
        return tmp;
    }

    public Abit createAbit(int Passtype, String PassSer, String PassNum) {
        implAbit tmp = new implAbit();
        tmp.setDataProvider(prov);
        tmp.setDataSystem(system);
        tmp.CreateAbit(Passtype,PassSer,PassNum);
        return tmp;
    }



    public ArrayList<ArrayList<String>> findAbit(HashMap<String, String> Data) {
        if ((Data == null)||(Data.size()==0)) {
            implAbit tmp = new implAbit();
            tmp.setDataProvider(prov);
            tmp.setDataSystem(system);
            return tmp.getBaseList();
        }
        return null;
    }

    public ArrayList<ArrayList<String>> findActions (int Id) {
            implAbit tmp = new implAbit();
            tmp.setDataProvider(prov);
            tmp.setDataSystem(system);
            return tmp.getActions(Id);
    }
}
